package com.ithinkstudio.jeez.config.filter;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

/**
 * 登录token拦截
 * 
 * @author fengzp
 *
 */
public class LoginFilter extends AbstractAuthenticationProcessingFilter implements InitializingBean {

	public LoginFilter(String loginUrl) {
		super(new AntPathRequestMatcher(loginUrl));
	}

	@Override
	public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
			throws AuthenticationException, IOException, ServletException {
		return null;
	}
	
	@Override
	public void afterPropertiesSet() {
		
	}

}
